<?php
/**
 *    part view: conversations_list
 *    File: conversation/part/conversations_list.php
 */
        if( count($conversations)>0 )
        {
          foreach ($conversations as $row)
          {
            if( $row->image_name != NULL )            
              $image = "<img src='".base_url()."profile/image/thumb/{$row->image_dir}/{$row->image_name}' alt='{$row->username}'>";            
            else
              $image = "<img src='".base_url()."img/no_photo.gif' alt=''>";
            $name = ( $row->name != "" )?$row->name:$row->username;
            $class_new = ($row->seen == 0)?"new":"";
            echo "
              
              <div class='notifications {$class_new}'>
              <a href='javascript:remove_conversation({$row->from},{$row->to})' class='delete-notif confirmLink' name='' title='".lang('delete_conversation')."' alt='".lang('confirm_delete_conversation')."' ></a>
              <a href='".base_url()."conversation/messages/{$row->username}.htm'>{$image}<span class='name'>{$name}</span>
              <span class='time'>{$row->time}</span>
              <br/>
              <span class='msg-intro'>{$row->content}</span>
              </a>
              <div class='clr'></div>
              </div><!--End notifications-->

                ";              
              //<input class='delete-notif' name='' onclick='remove_conversation({$row->from})' type='button'>
          }
        }
 ?>
      <div class="clr"></div>               
            <p id="contentspaginate" class="paginationstyle pagination" align="center">
                        Página: <a href="#" rel="previous" class="imglinks"><<  </a> &nbsp; <span class="flatview"></span> &nbsp; <a href="#" rel="next"> >></a>
       </p>
       <script language='javascript' >
          var contents_home=new virtualpaginate({
              piececlass: "notifications",
              piececontainer: 'div', 
              pieces_per_page: 10,
              defaultpage: 0,
              wraparound: false,
              persist: false
          })

          contents_home.buildpagination(["contentspaginate"]);
        </script>
        <script src="<?php echo base_url(); ?>js/dialog.js"></script>